import { shareAppMessageSet } from "../../../utils/config"
import { dataCollection } from "../../../utils/dataCollection"

// pages/order/pay-success/pay-success.ts
Page({

  /**
   * 页面的初始数据
   */
  data: {
    themeCode: ''
  },
  onOpenPage() {
    wx.redirectTo({ url: '../../../pages/index/index' })
  },
  onLoad() {
    //从本地获取当前选择的城市编码
    this.setData({
      themeCode: wx.getStorageSync('themeCode')
    })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
    return { ...shareAppMessageSet() }
  },
  onHide() {
    dataCollection.setPageMapData('leave')
  },
  onUnload() {
    dataCollection.setPageMapData('leave')
  },
  onShow() {
    dataCollection.setPageMapData('enter', '支付成功')
  },
})